package com.galaxis.wms.query

import com.galaxis.wms.entity.BasProjectItemRel
import com.querydsl.core.types.Path
import com.querydsl.core.types.PathMetadata
import com.querydsl.core.types.dsl.DateTimePath
import com.querydsl.core.types.dsl.NumberPath
import com.querydsl.core.types.dsl.StringPath
import com.querydsl.sql.ColumnMetadata
import com.querydsl.sql.RelationalPathBase

import java.sql.Timestamp
import java.sql.Types

import static com.querydsl.core.types.PathMetadataFactory.forVariable

/**
 * 物料与项目对应关系表(bas_project_item_rel)
 */
@SuppressWarnings("ALL")
class QBasProjectItemRel extends RelationalPathBase<BasProjectItemRel> {
    /** bas_project_item_rel表 */
    public static final QBasProjectItemRel basProjectItemRel = new QBasProjectItemRel("bas_project_item_rel")

    /** 关联关系Id */
    public final NumberPath<Long> relId = createNumber("relId", Long.class)
    /** 物料Id */
    public final NumberPath<Long> itemId = createNumber("itemId", Long.class)
    /** 项目Id */
    public final NumberPath<Long> projectId = createNumber("projectId", Long.class)
    /** 是否启用 */
    public final StringPath isEnable = createString("isEnable")
    /** 创建者 */
    public final StringPath createBy = createString("createBy")
    /** 创建时间 */
    public final DateTimePath<Timestamp> createAt = createDateTime("createAt", Timestamp.class)
    /** 修改者 */
    public final StringPath updateBy = createString("updateBy")
    /** 修改时间 */
    public final DateTimePath<Timestamp> updateAt = createDateTime("updateAt", Timestamp.class)
    /** 备注 */
    public final StringPath remark = createString("remark")

    QBasProjectItemRel(String variable) {
        super(BasProjectItemRel.class, forVariable(variable), "public", "bas_project_item_rel")
        addMetadata()
    }

    QBasProjectItemRel(String variable, String schema, String table) {
        super(BasProjectItemRel.class, forVariable(variable), schema, table)
        addMetadata()
    }

    QBasProjectItemRel(String variable, String schema) {
        super(BasProjectItemRel.class, forVariable(variable), schema, "bas_project_item_rel")
        addMetadata()
    }

    QBasProjectItemRel(Path<? extends BasProjectItemRel> path) {
        super(path.getType(), path.getMetadata(), "public", "bas_project_item_rel")
        addMetadata()
    }

    QBasProjectItemRel(PathMetadata metadata) {
        super(BasProjectItemRel.class, metadata, "public", "bas_project_item_rel")
        addMetadata()
    }

    void addMetadata() {
        addMetadata(relId, ColumnMetadata.named("rel_id").withIndex(1).ofType(Types.BIGINT).withSize(64))
        addMetadata(itemId, ColumnMetadata.named("item_id").withIndex(2).ofType(Types.BIGINT).withSize(64))
        addMetadata(projectId, ColumnMetadata.named("project_id").withIndex(3).ofType(Types.BIGINT).withSize(64))
        addMetadata(isEnable, ColumnMetadata.named("is_enable").withIndex(4).ofType(Types.VARCHAR).withSize(50))
        addMetadata(createBy, ColumnMetadata.named("create_by").withIndex(5).ofType(Types.VARCHAR).withSize(64))
        addMetadata(createAt, ColumnMetadata.named("create_at").withIndex(6).ofType(Types.TIMESTAMP).withSize(100))
        addMetadata(updateBy, ColumnMetadata.named("update_by").withIndex(7).ofType(Types.VARCHAR).withSize(64))
        addMetadata(updateAt, ColumnMetadata.named("update_at").withIndex(8).ofType(Types.TIMESTAMP).withSize(100))
        addMetadata(remark, ColumnMetadata.named("remark").withIndex(9).ofType(Types.VARCHAR).withSize(255))
    }
}
